<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="user-scalable=no, width=device-width, initial-scale=1.0, maximum-scale=1.0"/>
    <title>部门列表</title>
    <link rel="stylesheet" href="../css/style.css"/>
    <link rel="stylesheet" href="../css/font-awesome.min.css"/>
    <link href="../css/mobiscroll_002.css" rel="stylesheet" type="text/css">
    <link href="../css/mobiscroll_003.css" rel="stylesheet" type="text/css">
</head>
<body>
<div class="container">
    <div class="header">
        <a href="../index.html"><i class="icon-angle-left icon-large"></i></a>选择采购部门
    </div>
    <div class="main">
        <ul class="list-group bg-white">
            <li><input type="text" class="btn btn-block btn-default text-left startDateTime" value="前厅部门"/></li>
            <li><input type="text" class="btn btn-block btn-default text-left startDateTime" value="前厅部门"/></li>
            <li><input type="text" class="btn btn-block btn-default text-left startDateTime" value="前厅部门"/></li>
            <li><input type="text" class="btn btn-block btn-default text-left startDateTime" value="前厅部门"/></li>
            <li><input type="text" class="btn btn-block btn-default text-left startDateTime" value="前厅部门"/></li>
            <li><input type="text" class="btn btn-block btn-default text-left startDateTime" value="前厅部门"/></li>
        </ul>
        <input type="hidden" id="initDate"/>
    </div>
</div>
<script src="../js/zepto.min.js"></script>
<script src="../js/mobiscroll_002.js" type="text/javascript"></script>
<script src="../js/mobiscroll.js" type="text/javascript"></script>
<script>
    $(function () {
        $(".startDateTime").mobiscroll().date({
            headerText:'要求到货时间',
            theme: "android-ics light",
            display: 'bottom',
            lang: "zh",
            dateFormat: 'yyyy-mm-dd', //返回结果格式化为年月格式
            dateOrder: 'yyyymmdd',
            setText: '下一步',
            cancelText: '取消',
            nowText: "今天",
            mode: 'scroller',
            onSelect: function (valueText, inst) {
                //点击确定以后的结果
                alert($('#initDate').val());
                window.location.href = 'xuanzemoban.html';
            },
            formatResult: function (d) {
                $('#initDate').val((d[0] + '.' + (parseInt(d[1]) + 1) + '.' + d[2]));
                return d[0] + '.' + (d[1] + 1);
//                return ((d[0] - 0) + ((d[1] - 0) / 60)).toFixed(1);
            },
            parseValue: function (s) {
                var n = new Date(new Date().getTime() + 24 * 3600 * 1000);
                return [n.getFullYear(), n.getMonth(), n.getDate()];
            }
        });
    })
</script>
< / body >
< / html >